#!/usr/bin/env python

import sys, os

def init ( l, admin = 0 ):
	from liwe import parts
	from agenda_class import Agenda

	Agenda ( l )

	parts.add ( l.layman, [ "ext" ] )
	parts.add_wwl ( l.layman, [ "calendar" ] )

	l.layman.add_js ( "modules/agenda/js/agenda.js" )
	l.layman.add_css ( "modules/agenda/gfx/agenda.css" )
	#l.layman.add_css ( "modules/agenda/gfx/os3calendar.css" )

	l.layman.add_js_code ( "agenda.init();" )

	if admin and int ( admin ):
		l.layman.add_css ( "modules/agenda/gfx/agenda.admin.css" )
		l.layman.add_js ( "modules/agenda/js/agenda.admin.js" )
		l.layman.add_js_code ( "agenda.admin.init();" )

	return ''
